package tools;

import java.util.Comparator;

public class Comparepack implements Comparable<Comparepack>{
	private int alltime;
	private int behindnum;
	public Comparepack(int alltime,int behindnum) {
		this.alltime=alltime;
		this.behindnum=behindnum;
	}
	public int getAlltime() {
		return alltime;
	}
	public void setAlltime(int alltime) {
		this.alltime = alltime;
	}
	public int getBehindnum() {
		return behindnum;
	}
	public void setBehindnum(int behindnum) {
		this.behindnum = behindnum;
	}
	@Override
	public int compareTo(Comparepack o) {
		// TODO Auto-generated method stub
		if(alltime<=o.getAlltime()) return -1;
		return 1;
	}
	public String toString() {
		return alltime+"----"+behindnum;
	}
}
